<!-- inc:header -->
<div class="notice"><div class="p">
	<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td width="130px"><span class="lead">&nbsp;&raquo; 数据调用中心</span></td>
		<form method="post" action="{:site_url('phpok')}">
		<td align="left">
			搜索：<input type="text" name="keywords" id="keywords" value="{:$keywords}">
			<input type="submit" class="button" value="查询">
		</td>
		</form>
		<td align="right"><a href="{:site_url('phpok,set')}module_id={:$m_rs[id]}&" class="button">创建新的数据调用</a></td>
	</tr>
	</table>
</div></div>

<div class="main">
<table width="100%" style="layout:fixed;" cellpadding="0" cellspacing="0">
<tr>
	<td class="t_sub" width="50px">ID</td>
	<td class="t_sub" width="35px">状态</td>
	<td class="t_sub">主题</td>
	<td class="t_sub" width="150px">标识符</td>
	<td class="t_sub" width="130px">操作</td>
</tr>
<!-- $rslist AS $key=>$value -->
<tr class="tr_out" onMouseOver="over_tr(this)" onMouseOut="out_tr(this)">
	<td align='center' class="tc_left">{:$value[id]}</td>
	<td align="center" class="tc_right" id="status_{:$value['id']}"><img src="images/status{:intval($value['status'])}.gif" onclick="status('{:$value['id']}','{:intval($value['status'])}')" class="hander"></td>
	<td align='left' class="tc_right">&nbsp;{:$value[title]}<!-- if($value[note]) --><span class="clue_on"> {:$value[note]}</span><!-- end --></td>
	<td align='center' class="tc_right">{:$value[identifier]}</td>
	<td align="center" class="tc_right">
		<a href="{:site_url('phpok,set')}module_id={:$m_rs[id]}&id={:$value[id]}"><img src="images/page_edit.gif" alt="编辑"></a>
		<a href="javascript:del({:$value['id']});void(0);"><img src="images/page_delete.gif" alt="删除"></a>
	</td>
</tr>
<!-- end -->
</table>
</div>
<!-- if($pagelist) --><div class="table">{:$pagelist}</div><!-- end -->
<script type="text/javascript">
function view(id)
{
	var url = "{:site_url('phpok,view')}id="+id;
	Layer.init(url,550,400);
}

function del(id)
{
	if(!id)
	{
		alert("操作非法");
		return false;
	}
	var q = confirm("确定要删除此信息吗？删除后是不能恢复的");
	if(q != 0)
	{
		var url = base_url + base_func + "=ajax_del&id="+id;
		var msg = get_ajax(url);
		if(!msg) msg = "error: 操作非法";
		if(msg == "ok")
		{
			window.location.href = window.location.href;
		}
		else
		{
			alert(msg);
			return false;
		}
	}
}

//更改权限状态
function status(id,t)
{
	if(!id)
	{
		alert("操作非法");
		return false;
	}
	var url = base_url + base_func + "=ajax_status&id="+id;
	var msg = get_ajax(url);
	if(msg == "ok")
	{
		var n_t = t == 1 ? 0 : 1;
		var html = '<img src="images/status'+n_t+'.gif" border="0" onclick="status(\''+id+'\','+n_t+')" class="hander">';
		getid("status_"+id).innerHTML = html;
		return true;
	}
	else
	{
		if(!msg) msg = "error: 操作非法";
		alert(msg);
		return false;
	}
}
</script>
<!-- inc:footer -->